package com.myhouse.biz.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.myhouse.biz.DistrictService;
import com.myhouse.dao.DistrictDao;
import com.myhouse.dao.HouseDao;
import com.myhouse.dao.StreetDao;
import com.myhouse.entity.District;

@Service
public class DistrictServiceImpl  implements DistrictService{
	@Resource
	private DistrictDao districtDao;
	@Resource 
	private StreetDao streetDao;
	@Resource 
	private HouseDao houseDao;
	
	
	
	@Override
	public void add(District district) {
		districtDao.add(district);
	}

	@Override
	//未写好方法：
	public void delete(int id) {		
		districtDao.delete(id);	
	}

	@Override
	public void update(District district) {	
		districtDao.update(district);
		
		
	}

	@Override
	public List<District> getAll() {
		return districtDao.getAll();
	}

	@Override
	public District getDistrictById(int did) {
		
		return districtDao.getDistrictById(did);
	}

	@Override
	public List<District> getDistrictByTitle(String title) {

		return districtDao.getDistrictByTitle(title);
	}
	
	
}
